add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
+ gtk_widget_get_allocation (B, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
+ gtk_widget_get_allocation (B, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
+ gtk_widget_get_allocation (B, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
+ gtk_widget_get_allocation (B, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ gtk_widget_get_allocation (B, &allocation);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_CLAIMED);
add_gesture (C, "c3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ gtk_widget_get_allocation (B, &allocation);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ gtk_widget_get_allocation (B, &allocation);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ gtk_widget_get_allocation (B, &allocation);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
add_gesture (B, "b3", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (C, "c4", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
-
- gtk_widget_get_allocation (A, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ gtk_widget_get_allocation (B, &allocation);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
add_gesture (B, "b2", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (A, "a2", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ gtk_widget_get_allocation (B, &allocation);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
add_gesture (B, "b2", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (A, "a2", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_NONE);
- gtk_widget_get_allocation (A, &allocation);
- point_update (&mouse_state, A, allocation.width / 2, allocation.height / 2);
+ gtk_widget_get_allocation (B, &allocation);
+ point_update (&mouse_state, A, allocation.x, allocation.y);
point_press (&mouse_state, A, 1);
g_assert_cmpstr (str->str, ==,
/* Update with the grab under effect */
g_string_erase (str, 0, str->len);
- point_update (&mouse_state, A, (allocation.width / 2),
- (allocation.height / 2));
+ point_update (&mouse_state, A, allocation.x, allocation.y);
g_assert_cmpstr (str->str, ==,
"b1 updated, "
"c1 updated, "
add_gesture (A, "a1", GTK_PHASE_CAPTURE, str, GTK_EVENT_SEQUENCE_NONE);
add_gesture (B, "b1", GTK_PHASE_CAPTURE, str, GTK_EVENT_SEQUENCE_CLAIMED);
- gtk_widget_get_allocation (A, &allocation);
+ gtk_widget_get_allocation (B, &allocation);
/* First touch down */
- point_update (&touch_state[0], A, allocation.width / 2, allocation.height / 2);
+ point_update (&touch_state[0], A, allocation.x, allocation.y);
point_press (&touch_state[0], A, 1);
g_assert_cmpstr (str->str, ==,
/* Second touch down */
g_string_erase (str, 0, str->len);
- point_update (&touch_state[1], A, (allocation.width / 2),
- (allocation.height / 2));
+ point_update (&touch_state[1], A, allocation.x, allocation.y);
point_press (&touch_state[1], A, 1);
g_assert_cmpstr (str->str, ==,
str = g_string_new ("");
add_mt_gesture (C, "c1", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_CLAIMED);
- gtk_widget_get_allocation (A, &allocation);
+ gtk_widget_get_allocation (B, &allocation);
/* First touch down */
- point_update (&touch_state[0], A, allocation.width / 2, allocation.height / 2);
+ point_update (&touch_state[0], A, allocation.x, allocation.y);
point_press (&touch_state[0], A, 1);
g_assert_cmpstr (str->str, ==, "");
/* Second touch down */
- point_update (&touch_state[1], A, (allocation.width / 2),
- (allocation.height / 2));
+ point_update (&touch_state[1], A, allocation.x, allocation.y);
point_press (&touch_state[1], A, 1);
g_assert_cmpstr (str->str, ==,
/* A third touch down triggering again action */
g_string_erase (str, 0, str->len);
- point_update (&touch_state[2], A, (allocation.width / 2),
- (allocation.height / 2));
+ point_update (&touch_state[2], A, allocation.x, allocation.y);
point_press (&touch_state[2], A, 1);
g_assert_cmpstr (str->str, ==,
g = add_gesture (A, "a1", GTK_PHASE_CAPTURE, str, GTK_EVENT_SEQUENCE_CLAIMED);
add_mt_gesture (C, "c1", GTK_PHASE_BUBBLE, str, GTK_EVENT_SEQUENCE_CLAIMED);
- gtk_widget_get_allocation (A, &allocation);
+ gtk_widget_get_allocation (B, &allocation);
/* First touch down, a1 claims the sequence */
- point_update (&touch_state[0], A, allocation.width / 2, allocation.height / 2);
+ point_update (&touch_state[0], A, allocation.x, allocation.y);
point_press (&touch_state[0], A, 1);
g_assert_cmpstr (str->str, ==,
/* Second touch down, a1 denies and c1 takes over */
g_string_erase (str, 0, str->len);
- point_update (&touch_state[1], A, (allocation.width / 2),
- (allocation.height / 2));
+ point_update (&touch_state[1], A, allocation.x, allocation.y);
point_press (&touch_state[1], A, 1);
/* Denying sequences in touch-excess situation is a responsibility of the caller */
/* Move first point, only c1 should update */
g_string_erase (str, 0, str->len);
- point_update (&touch_state[0], A, (allocation.width / 2),
- (allocation.height / 2));
+ point_update (&touch_state[0], A, allocation.x, allocation.y);
g_assert_cmpstr (str->str, ==,
"c1 updated");
/* A third touch down triggering again action on c1 */
g_string_erase (str, 0, str->len);
- point_update (&touch_state[2], A, (allocation.width / 2),
- (allocation.height / 2));
+ point_update (&touch_state[2], A, allocation.x, allocation.y);
point_press (&touch_state[2], A, 1);
g_assert_cmpstr (str->str, ==,